<?php
/**
 * 海报博主首页焦点图控件
 * blogfocuscontroller.php
 * Create on 2015-04-18 11:16:03
 * Create by yuebin
 */
namespace haibao\cms\business\control\pc\channel\blog;

class BlogFocusController extends \haibao\cms\business\control\pc\channel\ChannelController{
	
	public function __construct($updateTime = null,$controlId,$isPublish){
		parent::__construct($updateTime,$controlId,$isPublish);
	}
	
	
	/**
	 * 获取模版内容
	 * @param : String $content
	 */
	public function displayTemplateHtml(){
	
		$controlData = $this->getParameter(self::$CONTROL_DATA);
		$content = $this->getParameter(self::$CONTROL_CONTENT);
		$parameters = array();
		if($controlData['auto']){
			$temp = array();
			foreach($controlData['auto'] as $data){
				$parameterValue = json_decode($data['ParameterValue']);
				array_push($parameters,$parameterValue);
			}
			array_slice($parameters, 0,$controlData['manual']['limit']);
		}
		$this->assign('parameters',$parameters);
		$path = $this->generateHtmlPath(__CLASS__);
		$this->generateHtml($path,$content);
		return $this->getHtml($path);
	}
}